import inherits from 'inherits'

import Modeler from 'bpmn-js/lib/Modeler'

import CustomModule from '../index'

function CustomModeler (options) {
  Modeler.call(this, options)

  this._customElements = []
}
const modules = Modeler.prototype._modules
const index = modules.findIndex(it => it.paletteProvider)
modules.splice(index, 1)

inherits(CustomModeler, Modeler)

CustomModeler.prototype._modules = [].concat(CustomModeler.prototype._modules, [
  CustomModule
])

export { CustomModeler }
